<script setup lang="ts">
import CodeEditor from '@/components/CodeEditor/index.vue';

const actual = ref(false);
const handleExport = () => {
  console.log('导出');
};

const logValue = ref('');
// todo 实现后端日志的实时更新
</script>

<template>
  <div class="app-container">
    <div style="display: flex">
      <h1>后端系统日志</h1>
      <div style="margin-left: auto">
        <el-space>
          <el-switch
            v-model="actual"
            size="large"
            inline-prompt
            active-text="实时日志"
            inactive-text="静态日志"
          />
          <el-button type="primary" @click="handleExport">导出</el-button>
        </el-space>
      </div>
    </div>
    <div>
      <CodeEditor v-model:text-value="logValue" :tab-boolean="false" :dark-boolean="true" :read-only="false"
                  :language="'sql'"></CodeEditor>
    </div>
  </div>
</template>

<style scoped lang="scss">

</style>